1. Field of the Invention
This invention relates to a method for creating computer programs. More specifically, the present invention relates to programming models and frameworks that are designed to facilitate and enforce the creation of scalable computer programs.
2. Description of the Related Art
Side effects and scalability issues have been constant problems in computer science since the inception of the discipline. In the past, scalability problems, i.e., problems arising from creating, maintaining, and improving large computer programs, have been solved by coupling different elements together to form new fundamental units of programming. The transition from unstructured to structured programming and from structured programming to object-oriented programming are examples of this approach. Today, related art in the field has concentrated on improving the composition of objects through data-flow systems, loose coupling of interfaces, design patterns, and frameworks for scalable network software.
Programmers initially encountered scalability problems with unstructured programming languages. Programs written with unstructured languages like Basic or Cobol execute a series of instructions linearly until the computer comes to a jump or goto instruction. The computer then jumps to another part of memory and starts executing code there. As explained in Edgar Dijkstra's paper “Go To Statement Considered Harmful”, because the flow control of a program jumps from place to place with no set structure, it is impossible to guarantee that a call to a set of instructions will return rather than following a different execution path.
The undesirable side effects that can be produced by unintentionally following an execution path make it extremely difficult to scale unstructured programs. The solution to this problem, which can be found in Kenneth Louden's “Programming Languages: Principles and Practices” is to force calls to code to have a single entry and exit point. Popular structured programming languages, like C and Pascal, forbid the goto and jump instructions of unstructured languages and eliminate the side effects of the unstructured model.
But structured programming languages also have scalability problems. Because variables in structured languages can have dozens of functions depending on them for their operations, changing the value of a single variable can have unintended side effects on any of the methods in a program. This hinders reuse and cripples scalability because it is impossible to guarantee that new functions will not have unintended side effects on data and other existing functions. “Object Oriented Design Heuristics” by Arthur J. Riel explains how this scalability problem is solved via the object, a unit of programming that couples data and methods.
In the past decade, the latest developments in building scalable computer programs have focused on monadic combinators in functional programming languages and improving how objects in object-oriented systems are composed. Monadic combinators, which are the closest related art, offer a scalable method for building parsers in functional languages like Haskell. Monadic combinators can be composed out of other monadic combinators and their results can be composed to perform calculations.
Outside of academia, the majority of work in the field has concentrated on components, which make it easy to create reusable objects. Loose interface coupling, whether by reading component signatures or using design patterns like abstract factories, are also widely used. Systems that aid programmers in constructing proofs that programs are correct and architectures for integrating diverse components are also popular.
These new contributions do not replace the object with a new fundamental unit, but instead provide frameworks or specially designed objects for solving common scalability problems in object-oriented software development. As a result, the popular programming languages in use today and the problems that attend them have not changed substantially since the introduction of object-oriented programming thirty years ago. In particular, the scalability problems that arise from the lack of coupling between syntactic and semantic relationships in object-oriented programming have not been addressed. Therefore, the need exists for a new programming model based on a new fundamental unit of programming that couples syntactic and semantic relationships and solves the scalability problems faced by today's programmers.